package com.scoressystem.service.imply;

import com.scoressystem.mapper.TeacherMapper;
import com.scoressystem.pojo.Teacher;
import com.scoressystem.service.TeacherService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class TeacherServiceimpl implements TeacherService {
    @Autowired
    TeacherMapper teachermapper;
    @Override
    public List<Teacher> AllteacherList() {
        return teachermapper.selectAllTeachers();
    }

    @Override
    public Teacher selectTeacherlogin(String tusername, String tpass) {
        return teachermapper.selectTeacherlogin(tusername, tpass);
    }

    @Override
    public int updateTeacher(Teacher teacher) {
        return teachermapper.updateTeacher(teacher);
    }

    @Override
    public Integer updateTeacherpass(String tpass,String tusername) {
        return teachermapper.updateTeacherpass(tpass,tusername);
    }


    public void setTeachermapper(TeacherMapper teachermapper) {
        this.teachermapper = teachermapper;
    }
}
